<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>发送测试短信</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0" />
    <#include "/view/head.html"/>
    <style type="text/css">
        .table-class{
            width:80%;
            text-align: center;
            border:1px solid #afd9ee;
            margin:0 auto;
            margin-top: 50px;
        }
        .list-path{
            height: 50px;
            line-height: 50px;
            background-color: #9acfea;

        }
        table th{
            text-align: center;
        }
        table thead tr {
            background-color: #9acfea;
        }
        .table-query{
            /*height: 40px;*/
            /*width:80px;*/
            /*text-align: center;*/
            white-space:nowrap;

        }
    </style>
    <script type="text/javascript">
        function query(dm){
            var val = $('#q').val();
            var sel = $('#approveStatus').val();
            location.href='${base}/approve/list.do?q='+val+'&approveStatus='+sel;
        }
    </script>
</head>
<body>

<div class="list-path" > <span style="margin-left: 50px;"><span class="glyphicon glyphicon-home"></span> 发送测试短信</span></div>

<div class="table-class">

       
     
     
     <form>
    <table class="table table-hover">
        <thead>
        <tr>
            <th>
             <span class="input-group-addon" >输入类发送类型</span></th>
            <th><input type="text" name="type"  class="form-control" name="type"></th>
        </tr>
          <tr>
            <th colspan="2">
               <button type="button" class="btn btn-default" onclick="sendPhone()">发送</button>
            </th>
        </tr>
        </thead>
     
    </table>
   </form>
</div>
   

</body>
</html>

 <script>
      
      function sendPhone(){
    	  
    	 var type= $("input[name='type']").val();
    	  
    	  $.ajax({
              type: "GET",
              url: "${base}/sendPhones",
              data: {
                  type:type},
              dataType: "json",
              success: function(data){
                  if(data.status=='1') {
                	  alert(data.msg);
                  }else{
                	  alert(data.msg);
                  }
              },
              error:function(e){
            	  alert("系统错误，请稍后重试");
              }
          });

    	  
      }
      
      </script>